package javase.implements_abstract_extend_clone;

import java.util.ArrayList;

class OrderSystem {
    public static ArrayList<Order> arrayList = new ArrayList<>();
    //进行订单处理
    public static void OrderCreation(Order order){
        while (order.getOrderNumber() >= 1000){
            Order orderClone = order.cloneOrder();
            orderClone.setOrderNumber(1000);
            arrayList.add(orderClone);
            order.setOrderNumber(order.getOrderNumber()-1000);
        }
        arrayList.add(order);
    }
}
